-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config: fix file/folder ownership #2745
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crazy-max
force-pushed
the
detect-sudo
branch
from
October 18, 2024 10:27
17c492d
to
4e4fd08
Compare
crazy-max
changed the title
set right ownership on file/folder when invoking with sudo
config: fix file/folder ownership
Oct 18, 2024
crazy-max
force-pushed
the
detect-sudo
branch
from
October 18, 2024 10:32
4e4fd08
to
438e3f1
Compare
crazy-max
force-pushed
the
detect-sudo
branch
5 times, most recently
from
October 18, 2024 11:31
dfd5ccf
to
fa17048
Compare
crazy-max
force-pushed
the
detect-sudo
branch
from
October 18, 2024 12:18
fa17048
to
6bc37ca
Compare
tonistiigi
reviewed
Oct 21, 2024
crazy-max
force-pushed
the
detect-sudo
branch
from
October 22, 2024 08:27
6bc37ca
to
b433f4b
Compare
crazy-max
force-pushed
the
detect-sudo
branch
from
October 22, 2024 14:24
b433f4b
to
3898cd5
Compare
crazy-max
commented
Oct 22, 2024
tonistiigi
reviewed
Oct 22, 2024
crazy-max
force-pushed
the
detect-sudo
branch
from
October 22, 2024 21:09
3898cd5
to
0dabcd8
Compare
crazy-max
force-pushed
the
detect-sudo
branch
2 times, most recently
from
October 22, 2024 21:19
6d17375
to
681d93d
Compare
tonistiigi
reviewed
Oct 22, 2024
crazy-max
force-pushed
the
detect-sudo
branch
from
October 23, 2024 07:45
681d93d
to
48657f3
Compare
Signed-off-by: CrazyMax <[email protected]>
crazy-max
force-pushed
the
detect-sudo
branch
from
October 23, 2024 16:23
48657f3
to
f89f861
Compare
tonistiigi
approved these changes
Oct 23, 2024
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
alternative and closes #2739
When buildx runs through
sudo
, file and folder created are owned by root user. This is fine ifHOME
is not kept in/etc/sudoers
config which is the default behavior on unix systems and would therefore write to/root
but this is not the case on macOS:Checked as well when using macos GitHub Runners:
If we try to create a builder with
sudo
, it would write withroot
owner in user's home:If we then try to remove this builder without sudo we got:
Same if try to list builders:
To fix this issue and avoid changing file permissions like #2739, we need to check if buildx is running through
sudo
and set right owner when writing file or folder in configuration directory.